<template>
  <div>
    <transition>
      <FrontPage v-if="isShowFontPage" />
    </transition>
    <router-view></router-view>
  </div>
</template>
<script lang="ts" setup>
import FrontPage from './components/front-page';
import { ref } from "vue"

const isShowFontPage = ref(false)

if (window.performance.navigation.type === 1) {
  isShowFontPage.value = true
} else {
  isShowFontPage.value = true
}

setTimeout(() => {
  isShowFontPage.value = false
}, 2000)
</script>
<style>
html {
  height: 0;
}

body {
  height: 100vh;
  background-color: #f4f3f3f2;
  /* color: #ffffff; */
  margin: 0;
}

span {
  font-size: 18px;
}

.v-enter,
.v-leave-to {
  opacity: 0;
}

/* v-enter-active 【入场动画的时间段】 */
/* v-leave-active 【离场动画的时间段】 */
.v-enter-active,
.v-leave-active {
  transition: all 0.8s ease;
}
</style>